package smartgrid;

import java.util.Arrays;
import java.util.List;
import javax.ejb.Local;
import smartgrid.exceptions.CantRemoveFromDBexception;
import smartgrid.exceptions.FacebookAccountDisabledException;
import smartgrid.exceptions.FacebookAccountNotExistException;

@Local
public interface FacebookAccountInterface {

    /**
     * @param UID Facebook Account ID
     * @return If account with UID exists -> true
     *         If Account has one or more contracts -> true
     *           Otherwise -> false
     */
    Boolean facebookAccountHasContracts(String uID) throws FacebookAccountDisabledException;
    
    /**
     * 
     * @param UID Facebook Account ID
     * @return returns one facebook account
     */
    FaceBookAccount getFacebookAccountByUID(String uID) throws FacebookAccountDisabledException;
    
    /**
     * 
     * @param UID Facebook Account ID
     * @param name Facebook Account user name
     * @param email Facebook Account email
     * @return If sucefull true
     */
    Boolean insertFacebookAccount(String uID, String name, String email);
    
    /**
     * Disable one Facebook Account
     * 
     * @param facebookUID Facebook Account UID
     * @throws FacebookAccountDisabledException
     * @throws FacebookAccountNotExistException
     * @throws CantRemoveFromDBexception 
     */
    void disableFacebookAccount(String facebookUID) throws FacebookAccountDisabledException, FacebookAccountNotExistException, CantRemoveFromDBexception;
    
    
      void enableFacebookAccount(String facebookUID) throws FacebookAccountDisabledException, FacebookAccountNotExistException, CantRemoveFromDBexception;
    /**
     * 
     * @param UID Facebook Account ID
     * @param contract Contract Number
     * @return If Succefull: true
     */
    @Deprecated
    Boolean addExistingContractToFacebookAccount(String uID, String contract);
    
    
    List<FaceBookAccount> getFacebookAccounts();

}
